package test;
import java.util.Scanner;
public class xizuo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int n = scan.nextInt();
        int[] a = new int[n];
        int sum = 0;
        for (int i = 0; i < n; i++) {
            a[i] = scan.nextInt();
            sum += a[i];
        }
        int count = 0;
        for (int i = 0; i < n; i++) {
            for (int j = i+1; j < n; j++) {
                if ((a[i] + a[j])%2==1 && (sum-a[i]-a[j])%2==1) {
                    count++;
                }else if((a[i] + a[j])%2==0 && (sum-a[i]-a[j])%2==0){
                    int p=0;
                    for(int k=0;k<n;k++){
                        if(k==i||k==j){
                            continue;
                        }
                    }
                    count++;
                }

            }
        }
        System.out.println(count);
        scan.close();
    }
}
